#include <cs50.h>
#include <stdio.h>
	
int main () {
	int x = 0;
	do {
		printf("请输入一个不超过5位数的正整数：");
		x = GetInt();
	} while(x <= 0 || x > 100000);
	
	printf("个位数是：%d \n", x % 10);
	
	int i = 1;
	while (x >= 10) {
		x = x / 10;
		i++;
	} 

	printf("是%d位数\n", i);

}
